package com.ysd.servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ysd.entity.Product;
import com.ysd.service.productService;

@WebServlet("/productdetailsServlet")
public class productdetailsServlet extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String proId=req.getParameter("Id");
		
		ArrayList<Product> details=productService.getdetails(proId);
		req.setAttribute("details", details);
		req.getRequestDispatcher("productdetails.jsp").forward(req, resp);
		
	}
}
